
#ifdef DEFINE_APP

#include "Mcrypt.h"
#include <mcrypt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;

#define ALGORITHMS_DIR NULL
#define MODES_DIR NULL
/* #define ALGORITHMS_DIR NULL
 * #define MODES_DIR NULL
 */
#define TEXT "a small text, just to test the implementation"

int main() {

    char **names;
    char **modes;
    int imax, jmax;
    names = mcrypt_list_algorithms(NULL, &jmax);
    modes = mcrypt_list_modes(NULL, &imax);

    for (int j = 0; j < jmax; j++) {
        //printf( "Algorithm: %s\n", names[j]);
        for (int i = 0; i < imax; i++) {
            //printf("\t%s\n", modes[i]);
        }
    }

    wtt_mcrypt_module_open("des", "cfb", "k63334f1");

    char buf[] = "13918554487";
    char * cr = wtt_mcrypt_generic(buf);
    printf("%s\n", cr);

    //cr[16] = '\0';
    printf("%s\n", cr);
    char * ret = wtt_mdecrypt_generic(cr);
    printf("%s\n", ret);

    char buf1[] = "13671974201";
    cr = wtt_mcrypt_generic(buf1);
    printf("%s\n", cr);

    //cr[16] = '\0';
    printf("%s\n", cr);
    ret = wtt_mdecrypt_generic(cr);
    printf("%s\n", ret);

    return 0;
}


#endif //DEFINE_APP
